#include "stdafx.h"
#include "RequestsManager.h"
#include "HttpClient.h"


int APIENTRY WinMain(_In_ HINSTANCE hInstance,
                     _In_opt_ HINSTANCE hPrevInstance,
                     _In_ LPSTR    lpCmdLine,
                     _In_ int       nCmdShow)
{
	UNREFERENCED_PARAMETER(hPrevInstance);
	UNREFERENCED_PARAMETER(lpCmdLine);
	UNREFERENCED_PARAMETER(hInstance);
	UNREFERENCED_PARAMETER(nCmdShow);

	HttpClient::reset();

	while (true)
	{
		SqlRequest request;
		HttpClient::receive(request);
		RequestsManager::run(request);
		request.clear();

		::Sleep(1000);
	}

	return 0;
}
